package com.ruoyi.system.api.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * @author breeze
 * @date 2024-01-15
 */
public class SysDatascope extends BaseEntity{

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 数据权限编码 */
    @Excel(name = "数据权限编码")
    private String code;

    /** 数据权限名称 */
    @Excel(name = "数据权限名称")
    private String name;

    /** 拥有者表名 */
    @Excel(name = "拥有者表名")
    private String ownerTable;

    /** 拥有者名称 */
    @Excel(name = "拥有者名称")
    private String ownerName;

    /** 拥有者字段名 */
    @Excel(name = "拥有者字段名")
    private String ownerKey;

    /** 资源表名 */
    @Excel(name = "资源表名")
    private String resourceTable;

    /** 资源名称 */
    @Excel(name = "资源名称")
    private String resourceName;

    /** 资源字段名 */
    @Excel(name = "资源字段名")
    private String resourceKey;

    /** 使用者表名 */
    @Excel(name = "使用者表名")
    private String entityTable;

    /** 使用者名称 */
    @Excel(name = "使用者名称")
    private String entityName;

    @Excel(name = "使用者字段名")
    private String entityKey;
    
    /** 使用者别名 */
    @Excel(name = "使用者别名")
    private String entityAlias;

    /** SQL样例 */
    @Excel(name = "SQL样例")
    private String sqlSample;

    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setOwnerTable(String ownerTable) 
    {
        this.ownerTable = ownerTable;
    }

    public String getOwnerTable() 
    {
        return ownerTable;
    }
    public void setOwnerName(String ownerName) 
    {
        this.ownerName = ownerName;
    }

    public String getOwnerName() 
    {
        return ownerName;
    }
    public void setOwnerKey(String ownerKey) 
    {
        this.ownerKey = ownerKey;
    }

    public String getOwnerKey() 
    {
        return ownerKey;
    }
    public void setResourceTable(String resourceTable) 
    {
        this.resourceTable = resourceTable;
    }

    public String getResourceTable() 
    {
        return resourceTable;
    }
    public void setResourceName(String resourceName) 
    {
        this.resourceName = resourceName;
    }

    public String getResourceName() 
    {
        return resourceName;
    }
    public void setResourceKey(String resourceKey) 
    {
        this.resourceKey = resourceKey;
    }

    public String getResourceKey() 
    {
        return resourceKey;
    }
    public void setEntityTable(String entityTable) 
    {
        this.entityTable = entityTable;
    }

    public String getEntityTable() 
    {
        return entityTable;
    }
    public void setEntityName(String entityName) 
    {
        this.entityName = entityName;
    }

    public String getEntityName() 
    {
        return entityName;
    }
    public void setEntityAlias(String entityAlias) 
    {
        this.entityAlias = entityAlias;
    }

    public String getEntityAlias() 
    {
        return entityAlias;
    }
    public void setSqlSample(String sqlSample) 
    {
        this.sqlSample = sqlSample;
    }

    public String getSqlSample() 
    {
        return sqlSample;
    }
    
    public String getEntityKey() {
		return entityKey;
	}

	public void setEntityKey(String entityKey) {
		this.entityKey = entityKey;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("name", getName())
            .append("ownerTable", getOwnerTable())
            .append("ownerName", getOwnerName())
            .append("ownerKey", getOwnerKey())
            .append("resourceTable", getResourceTable())
            .append("resourceName", getResourceName())
            .append("resourceKey", getResourceKey())
            .append("entityTable", getEntityTable())
            .append("entityName", getEntityName())
            .append("entityAlias", getEntityAlias())
            .append("sqlSample", getSqlSample())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}